package jdk8.function.interfaceX;

/**
 **/
public class Demo01UserFunctionInterface {
    public static void show(Demo01MyDefinedFunInterface defFun) {
        defFun.method();
    }

    public static void main(String[] args) {
        show(new Demo01MyDefinedFunInterface() {
            @Override
            public void method() {
                System.out.println("使用匿名内部类重写接口中的抽象方法");
            }
        });

        show(() -> {
            System.out.println("Lambda");
        });


    }
}
